﻿//***********************************************************************
//* Module:  TbBstVisitsBLL.cs
// * 作者:  曹荣芝
//* Modified: 2013/6/13
// * Purpose: Definition of the Class XWG.JWBST.AuthBLL.TbBstVisitsBLL
// ***********************************************************************/
using System;
using System.Data;
using XWG.JWBST;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using XWG.JWBST.JWBSTEntity;
using XWG.Framework.AuthUtility;
namespace XWG.JWBST.JWBSTBLL
{
    /// <summary>
    /// 
    /// </summary>
    public class TbBstVisitsBLL
    {
        #region 删除操作
        /// <summary>
        /// 删除。
        /// </summary>
        /// <param name="id">要删除的的主键值。</param>
        /// <param name="userid">操作员。</param>
        /// <param name="isLog">是否写入日志。</param>
        /// <returns>是否成功 1 表示成功 负值代表失败</returns>
        public static ResultModel Delete(object id, object userid, bool isLog)
        {
            return JWBSTDAL.TbBstVisitsDAL.Delete(id, userid, isLog);
        }
        #endregion
        #region 根据主键查询一条记录
        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns>用户实体</returns>
        public static TbBstVisits Load(object id)
        {
            return JWBSTDAL.TbBstVisitsDAL.Load(id);
        }
        #endregion
        #region 查询操作
        /// <summary>
        /// 查询
        /// </summary>
        public static IList<TbBstVisits> SelectList()
        {
            return JWBSTDAL.TbBstVisitsDAL.SelectList();
        }
        #endregion
        #region 插入操作
        /// <summary>
        /// 新增。
        /// </summary>
        /// <param name="info">待新增的信息。</param>
        /// <param name="userid">操作员。</param>
        /// <param name="isLog">是否写入日志。</param>
        /// <returns>新增是否成功的标示。（1：成功；负值失败）</returns>
        public static ResultModel Insert(TbBstVisits info, object userid, bool isLog)
        {
            return JWBSTDAL.TbBstVisitsDAL.Insert(info, userid, isLog);
        }
        #endregion
        #region 修改操作
        /// <summary>
        /// 修改。
        /// </summary>
        /// <param name="info">待修改的信息。</param>
        /// <param name="userid">操作员。</param>
        /// <param name="isLog">是否写入日志。</param>
        /// <returns>修改是否成功的标示。（1：成功；负值失败）</returns>
        public static ResultModel Update(TbBstVisits info, object userid, bool isLog)
        {
            return JWBSTDAL.TbBstVisitsDAL.Update(info, userid, isLog);
        }
        #endregion


        /// <summary>
        /// 根据时间点获取手机各个模块使用量
        /// </summary>
        /// <param name="datetime"></param>
        /// <returns></returns>
        public static DataTable GetVisitsNumByDD(string datetime)
        {
            return JWBSTDAL.TbBstVisitsDAL.GetVisitsNumByDD(datetime);
        }

        /// <summary>
        /// 根据时间段获取手机各个模块使用量
        /// </summary>
        /// <param name="starttime"></param>
        /// <param name="endtime"></param>
        /// <returns></returns>
        public static DataTable GetVisitsNumByDate(string starttime, string endtime)
        {
            return JWBSTDAL.TbBstVisitsDAL.GetVisitsNumByDate(starttime,endtime);
        }


        /// <summary>
        /// 按照月份获取手机各个模块使用量
        /// </summary>
        /// <param name="dateMM"></param>
        /// <returns></returns>
        public static DataTable GetVisitsNumByMM(string dateMM)
        {
            return JWBSTDAL.TbBstVisitsDAL.GetVisitsNumByMM(dateMM);
        }
        
    }
}
